/**
 * 对小于10的书进行补0操作
 * @param {*} num 
 */

function perty(num){
    return num = num > 9 ? num : '0' +num;
 }

 /**
  * 返回当前的时间
  */
 function getNow(){
   let now  = new Date();

    let year = now.getFullYear();
    let month = now.getMonth() +1;
    month = perty(month);
    let  day = now.getDate();
    day = perty(day);
    let hour = now.getHours();
    hour = perty(hour);
    let minute = now.getMinutes();
    minute = perty(minute);
    let second = now.getSeconds();
    second = perty(second);

    let str = year + '-'
            + month + '-'
            + day +'  '
            + hour + ':'
            + minute +':'
            + second;
     return str;
            
 }